/* 空元素显示的内容 */
.empty-content:empty::before {
  /* content: attr(placeholder); */
  content: '记笔记...';
  font-size: 14px;
  color: #666;
  line-height: 21px;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* 设置ol显示格式 */
.module-editor ol {
  counter-reset: sectioncounter;
}

.module-editor ol li {
  list-style: none;
  position: relative;
}

.module-editor ol li::before {
  content: counter(sectioncounter) '.';
  counter-increment: sectioncounter;
  margin-right: 10px;
}

/* 使用自定义伪类会导致光标偏移向下 */
/* .module-editor ul {
  position: relative;
}

.module-editor ul li {
  list-style-type: none;
  word-break: break-all;
}

.module-editor ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  background-color: #000;
  margin-right: 6px;
  display: inline-block;
  border-radius: 100%;
  transform: translateY(-2px);
  margin-left: 1px;
} */

.module-editor ul li {
  word-break: break-all;
  list-style: disc inside;
}

/* 常用flex布局 */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-left {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.flex-right {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.flex-items {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex1 {
  flex: 1;
}

/* ellips */
.hidden {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

html,
body,
.app,
.transition,
.bg-white {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0);
  outline: none;
}

.bg-white {
  background-color: #fff;
}

/* 软件阴影 */
.app {
  box-shadow: 0 0 4px rgb(185, 185, 185);
}

body {
  padding: 4px;
  user-select: none;
  outline: none;
}

@keyframes fadein {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeout {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0;
  }
}

/* 进入和退出动效 */
.app-show {
  animation: fadein 0.4s forwards;
  transform: scale(1) !important;
}

.app-hide {
  animation: fadeout 0.2s forwards;
  transform: scale(0.9);
}

/* 颜色 */
.white-content {
  transition: background-color 0.4s;
  background-color: #ffffff !important;
}

.yellow-content {
  transition: background-color 0.4s;
  background-color: #fff7d1 !important;
}

.green-content {
  transition: background-color 0.4s;
  background-color: #e4f9e0 !important;
}

.pink-content {
  transition: background-color 0.4s;
  background-color: #ffe4f1 !important;
}

.purple-content {
  transition: background-color 0.4s;
  background-color: #f2e6ff !important;
}

.blue-content {
  transition: background-color 0.4s;
  background-color: #e2f1ff !important;
}

.gray-content {
  transition: background-color 0.4s;
  background-color: #f3f2f1 !important;
}

.black-content {
  transition: background-color 0.4s;
  background-color: #696969 !important;
  /* color: #fff; */
}


/* 针对富文本做特定的样式 */
.black-content .vditor-copy {
  color: #24292D !important;
}
.black-content .vditor-copy span {
  color: #24292D !important;
}
.black-content .vditor-copy path {
  color: #24292D !important;
}

.black-content .vditor-ir__node--expand .vditor-ir__marker--heading {
  color: #fff !important;
}

.black-content * {
  color: #fff;
}

.window-blur-hide .vditor-toolbar {
  top: 40px !important;
  height: 0 !important;
  transition: top 0.4s, height 0.4s;
}

.vditor-toolbar {
  box-shadow: 0 0 2px #ccc;
}

.vditor-reset p {
  margin-bottom: 8px;
}
.vditor-reset img {
  cursor: pointer;
}
.page-editor:not(.white-content) .vditor-reset blockquote {
  border-left-color: #ababab !important;
}
.page-editor:not(.white-content) .vditor-reset h1, .vditor-reset h2 {
  border-bottom-color: #ababab !important;
}
.page-editor:not(.white-content) .vditor-reset hr {
  background-color: #d2d2d2 !important;
}

.vditor-img {
  top: 40px !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.vditor-img__img img {
  max-width: 100% !important;
}


@media (prefers-color-scheme: dark) {
  body,
  .header,
  body .bg-white,
  body .page-index,
  body .page-setting,
  body .page-editor,
  body .bottom-editor-tools,
  body .options-container .options-content, /* 遮罩列表 */
  #rightClick {
    background-color: #333 !important;
    color: white !important;
    transition: background-color 0.4s;
  }
  body .options-container .options-content * {
    color: white !important;
  }
  /* 头部 */
  .header a {
    color: white !important;
  }
  /* 编辑遮罩 */
  body .options-container .options-cover {
    background-color: rgba(0, 0, 0, 0.6) !important;
  }
  /* 右键列表 */
  .right-click-menu-list li:hover {
    background-color: rgba(0, 0, 0, 0.4) !important;
  }
  body .about-app-description,
  body .disabled-line {
    color: #828282;
  }
}

@media (prefers-color-scheme: light) {
  body {
    /* background-color: #fff !important; */
    color: black !important;
  }
}
